home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global activeSprite, homeV, homeH, snap1, snap2, RcurrentWeight, LcurrentWeight, stickH1List, stickH2List, stickV1List, stickV2List, homeHList, homeVList, stickh1, stickh2, stickv1, stickv2, offRight, offLeft, tempcount, oldActive
- set activeSprite to the clickOn
- set offLeft to 0
- set offRight to 0
- set snap1 to 0
- set snap2 to 0
- set tempR to RcurrentWeight - LcurrentWeight + 5
- if tempR > 9 then
- set tempR to 9
- end if
- if tempR < 1 then
- set tempR to 1
- end if
- set good to 0
- set G to 3
- repeat while not good
- set stickh1 to getAt(stickH1List, G)
- set used to 0
- repeat with f = 14 to 17
- if the locH of sprite f = stickh1 then
- set used to 1
- end if
- end repeat
- set G to G + 1
- if not used then
- set good to 1
- end if
- end repeat
- set good to 0
- set G to 3
- repeat while not good
- set stickh2 to getAt(stickH2List, G)
- set used to 0
- repeat with f = 14 to 17
- if the locH of sprite f = stickh2 then
- set used to 1
- end if
- end repeat
- set G to G + 1
- if not used then
- set good to 1
- end if
- end repeat
- set stickv1 to getAt(stickV1List, tempR)
- set stickv2 to getAt(stickV2List, tempR)
- set homeH to getAt(homeHList, activeSprite - 13)
- set homeV to getAt(homeVList, activeSprite - 13)
- puppetSprite(30, 1)
- if the castNum of sprite activeSprite < 231 then
- set the castNum of sprite 30 to the castNum of sprite activeSprite + 10
- else
- set the castNum of sprite 30 to the castNum of sprite activeSprite
- end if
- set the visible of sprite 30 to 1
- set the locH of sprite 30 to the locH of sprite activeSprite
- set the locV of sprite 30 to the locV of sprite activeSprite
- set oldActive to activeSprite
- set the visible of sprite activeSprite to 0
- set activeSprite to 30
- if the locV of sprite activeSprite <> homeV then
- if the locH of sprite activeSprite > 170 then
- set offRight to 1
- set stickv2 to the locV of sprite activeSprite
- set stickh2 to the locH of sprite activeSprite
- else
- set offLeft to 1
- set stickv1 to the locV of sprite activeSprite
- set stickh1 to the locH of sprite activeSprite
- end if
- end if
- go("num")
- end
-
- on mouseUp
- global activeSprite, oldActive
- set the visible of sprite oldActive to 1
- set the visible of sprite activeSprite to 0
- go("S")
- end
-